Computer processors typically provide several operating modes. Operating modes for ordinary code such as operating systems, user applications, and the like typically include real mode, in which the processor uses physical memory addresses, and protected mode, in which the processor uses virtualized memory addresses. Processors may provide additional modes, such as long mode for addressing a large address space.
Certain processors provide a special operating mode called System Management Mode (“SMM”) for handling certain interrupts generated by hardware components of the computer platform, called System Management Interrupts (“SMIs”). Upon detecting an SMI, such a processor suspends execution by saving its current state and then entering SMM. Inside SMM, the processor executes SMI handler code. Such SMI handler code may perform tasks such as error handling, power management, platform flash memory updating, system management tasks, and the like. Upon completion, the SMI handler code executes a resume instruction (“RSM”), causing the processor to reload its saved state and resume execution of the previous operating mode. Receiving the SMI, entering SMM, and the operation of the SMI handler are thus transparent to other code executing on the processor, including operating system code.
Certain multi-core processors may handle an SMI by broadcasting the SMI to all processor cores. Upon receiving the SMI and entering SMM, each processor core may race to become the master core responsible for handling the SMI. Such master core is often called the “monarch” or the “boot strap processor.” The master core waits for the other, subordinate cores (sometimes called “application processors”) to enter SMM before handling the SMI. While the master core handles the SMI, the subordinate cores idle in a wait loop. Thus, SMI handler code may be single-threaded even when executed on multi-core processors.
Typical processors also include a machine check architecture. Such machine check architecture is a low-level mechanism to detect hardware errors in the processor or the computer platform (“machine check exceptions”) and alert the operating system. Some machine check exceptions may be corrected in hardware or by the operating system; uncorrected machine check exceptions are generally fatal errors and may result in an operating system crash (e.g., a “stop error,” “kernel panic,” “blue screen,” or the like).